home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************/
- /* */
- /* LabelMerge v1.02 */
- /* */
- /* */
- /* Copyright ©1996-1997 by Dick Whiting */
- /* */
- /*========================================================================*/
- /* */
- /* */
- /* Report bugs, comments, etc. to: */
- /* */
- /* Dick Whiting <dwhiting@europa.com> */
- /* */
- /* 04 August 1997 */
- /* */
- /*========================================================================*/
- /* Standard Disclaimer: I wrote it, it works for me, I don't guarantee */
- /* that it will do anything productive for anyone else, etc. etc. ;-) */
- /* */
- /* HOWEVER, if you do find a use for it, my kids would REALLY love a */
- /* postcard from where ever you live. Thanks. I really do hope this helps */
- /* you to continue using and enjoying your Amiga and PageStream. */
- /* */
- /* POSTCARDS: Dick Whiting */
- /* 28590 S. Beavercreek Rd. */
- /* Mulino, Oregon 97042 */
- /* USA */
- /* */
- /**************************************************************************/
-
- BASICS:
-
- This program allows you to use a PageStream template file and a
- data file to create 'mail merged' address labels, disk labels, etc.
-
-
- FILES INCLUDED IN THIS ARCHIVE:
-
- LabelMerge.rexx - the program
- LabelMerge.prefs - the default preferences file
- LabelMerge.readme - this file;)
- LMtest.pgs - an example PageStream template
- LMtest.data - an example data file
-
- REQUIREMENTS:
-
- A PageStream template file with all label areas bounded by
- margin guides, page guides, and/or column guides. Create just 1 page this
- way and then create a single (assuming there is only one type of label on
- each page) text frame. The automatic mode of this program expects this
- frame to be the TOP UPPER LEFT one. Within the text frame type any text
- that you desire and specify data to be replaced by a variable name within
- a pair of indicators. The program is set up to handle < >, « », [ ], { }
- as indicators. The « » pair can be produced using Alt-9 and Alt-0.
- When you are satisifed with the template, save it somewhere for later use.
- If you haven't tried the 'Open Template' script, now would be a good time.
- You can, of course, create your own.
-
- A Data file provides the information that is used to replace the variables
- withing the template. The data file's first record must list the variable
- names to use and be separated by a delimiter. The program has options for
- using COMMA, TAB, and SEMI-COLON as delimiters.
-
- The first record (with COMMA delimiter) might look like this:
-
- name,addr,city,state,zip
-
- with TAB as the delimiter:
-
- name addr city state zip
-
-
- The remaining records specify the replacement data for each label. The
- fields must be in the same order as the variables in the header and
- separated by the SAME delimiter. Each record will be used for ONE label in
- the template.
-
- Example (using COMMA and the variables in the example header):
-
- Dick Whiting,28590 S. Beavercreek Rd.,Mulino,OR,97042
-
-
- INSTALLATION:
-
- Copy LabelMerge.rexx to PageStream3:Scripts/LabelMerge.rexx
- Copy LabelMerge.prefs to PageStream3:Scripts/LabelMerge.prefs
-
- The prefs file can be moved elsewhere, but you will have to change the line
- in LabelMerge.rexx that points to it (line 54):
-
- prefsfile="PageStream3:scripts/LabelMerge.prefs"
-
- Update the prefs file as you desire. You might want to 'play' with the
- program before you do this so that you know what you're changing.
-
-
- !! WARININGS !!
- !! WARININGS !!
-
- 1). Make sure 'Automatic Text Frames' is turned OFF prior to running
- this script. This option results in as many empty pages as there are
- records in your data file;)
-
-
- SETUP REQUESTER OPTIONS:
-
- The FIELD DELIMITER cycle gadget selects which field delimiter to look for
- in the data file. The options are COMMA, TAB, and SEMICOLON.
-
- The VARIABLE FORMAT cycle gadget selects how to identify variables within
- the PageStream template file. The options are < >, « », [ ], and { }
-
- When AUTOMATIC MODE is checked the program expects a SINGLE text frame size
- and that the model, with the text and variables, is the top left object on
- the page.
-
- When AUTOMATIC MODE is turned off you are prompted to select which frame is
- the model and may have more than one label size and model on a page.
-
- When WATCH ME WORK is checked you see each text frame as it is created and
- each page as it is filled. With it turned off, only the first page is
- displayed. It APPEARS that all of the text frames are being overlayed onto
- the first page, but all is actually OK;)
-
- On my A4000/040:
- 100 address labels in 129 seconds with WATCH ME WORK on
- 100 address labels in 111 seconds with WATCH ME WORK off
-
- FUZZINESS controls how close a bounded area must be to be considered a
- target for a copy of the model text frame. The default is that if a bounded
- area is within 10% of the same width and within 10% of the same height, it
- was meant to be one of the labels. I did this because of inconsistency on
- some of the Avery templates I tried. You can make this looser or tighter by
- changing the value. 0 would require an EXACT match of size; .50 would be a
- ridiculous mismatch but is arbitrarilly the maximum value the program will
- accept.
-
- The PAGESTREAM string gadget is used to enter the name of the template file
- to use. The ? mark calls up the standard requester. The default path for
- this is PageStream3:
-
- The DATA FILE string gadget operates the same way.
-
- LABEL MERGE MESSAGES area displays error messages and prompts as necessary.
-
- The OK button tells the program to proceed.
-
- The CANCEL button tells the program to quit.
-
- The HELP button displays a shortened version of this file.
-
-
- All of the cycle, check, and string gadgets may be modified in the prefs
- file. The only caveat is to make sure to place path and file names within
- quote marks when modifying this file.
-
- After the labels are generated, you need to verify their appearance and then
- may print or save as you desire. If you are using a landscape form, remember
- to change to landscape printing using the Print Setup menu before printing.
-
-
- ACCIDENTAL FEATURES;)
-
- If you create a model without ANY variables specified OR select the wrong
- delimiter OR place the WRONG variable names in the header record of the data
- file, you will end up creating as many labels as there are data records.
- These labels will ALL BE THE SAME as the model (a way of duplicating, though
- not real fast).
-
-
- LIMITATIONS:
-
- The speed is not what I would consider suitable for MAJOR mailings, etc.
- You can probably use 1 label/second as a rough estimate of how long a job
- will take. This is very reasonable for a few hundred labels, but becomes a
- BATCH job to be done during dinner when the numbers are in the thousands.
-
- The longest string Arexx can handle is 256 characters. This means that AFTER
- variable data replacement no LINE can exceed this maximum or characters will
- be lost. This is probably not a problem except for Postcards. You can handle
- these by making sure there is a line return every so often.
-
- A line end is added to the last line of text in the model. This may result
- in the text block overflow symbol appearing. It is only the extra line end
- and should be ignored.
-
- Some of the AveryLabel templates generated by 'Open Template' are NOT
- useable by this program. These are the ones that do not have a left margin
- specified and the (so far) one that has a page guide specified LOWER than
- the BOTTOM MARGIN. If you use these you can add or move the guides as
- necessary prior to saving. The ones I have found that have problems are:
-
- Form Problem
- --------------------- ------------------------------------
- 41256 Organizer Pages no left margin
- 41537 Organizer Pages no left margin
- 7674 Video Spines page guide lower than bottom margin
-
-
- EMERGENCY:
-
- If something does go wrong you can PROBABLY stop this script by:
-
- 1) switch to WorkBench
- 2) open a CLI
- 3) type in 'HI' (without the quote marks)
- 4) it SHOULD stop within a few seconds.
-
- The Arexx interface seems to have some situations under which PageStream
- goes into a TIGHT CPU loop. If this happens (and I hope it doesn't), you may
- have no option but to reboot. Make sure all disk I/O is done, close any
- applications that you can and then do it. I have tried to trap all of the
- conditions which trigger this, but YOU may find some new ones.
-
-
- HISTORY:
-
- 04Aug1997 - Fixed handling of < > \ @ characters within a data file.
-
- 01Dec1996 - Make sure 'Automatic Text Frames' is turned OFF prior to running
- this script. (Thanks to: William F. Maddock). I will try to handle this
- within the script, but ONLY if I can return your settings to their original
- condition afterwards. Righ NOW, there doesn't appear to be a way to tell
- what YOUR preferences are from within the script.
-
- As of the date of uploading this program, I have stopped being able to break
- it. This does not mean it is bug free. If you find any, please email me so
- that I can correct it for others. Thanks.
-
-
- Dick Whiting
- August 04, 1997
-